include ../.env
export $(shell sed 's/=.*//' ../.env)

OPENTSDB_IMAGE_NAME=${IMAGE_REPO}/opentsdb-devel:${OPENTSDB_VERSION}

opentsdb:
	cd build && docker build -t ${OPENTSDB_IMAGE_NAME}  \
		--build-arg IMAGE_REPO=${IMAGE_REPO}  \
		--build-arg HBASE_VERSION=${HBASE_VERSION} \
		--build-arg OPENTSDB_VERSION=${OPENTSDB_VERSION} \
		. 
ifeq (${PUSH},true)
	docker push ${OPENTSDB_IMAGE_NAME}
endif

.PHONY: compose
compose:
	cd compose && docker compose up -d

.PHONY: compose-clean
compose-clean:
	cd compose && docker compose down